package com.scaffold.authority.entity;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

import org.hibernate.annotations.Proxy;

import wangjg.security.core.AuthoritySet;

/**
 * 角色权限
 * @ManyToMany Role.id=RoleAuthorityRelation.roleId~RoleAuthorityRelation.roleId=Authority.id#name
 */
@Entity
@Proxy(lazy = false)
public class RoleAuthorityRelation extends BasicBizEntity{
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = IDENTITY)
	private Long id;
	
	//@ref Role#id
	private Long roleId;
	//@ref Authority#id
	private Long authorityId;

	public RoleAuthorityRelation() {
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getRoleId() {
		return roleId;
	}

	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}

	public Long getAuthorityId() {
		return authorityId;
	}

	public void setAuthorityId(Long authorityId) {
		this.authorityId = authorityId;
	}
	
}